package com.hzy.quetosys.entity;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;


@Data
public class Product {
    private int id;

//@NotBlank(message = "产品类型不能为空")
    private int typeId;

    @NotBlank(message = "产品名称不能为空")
    @Size(max=50,message = "产品名称不能超过50字")
    private String name;

    @NotBlank(message = "产品地域不能为空")
    @Size(max=50,message = "产品地域不能超过50字")
    private String area;

    @NotBlank(message = "产品生产者不能为空")
    @Size(max=50,message = "产品生产者不能超过50字")
    private String owner;

    @NotBlank(message = "产品单位不能为空")
    @Size(max=50,message = "产品单位不能超过50字")
    private String unitName;

   @NotNull(message = "产品价格不能为空")
    private double price;


    private int number;

    private String other;

    private ProductType productType;
}
